import { get,post } from './axios'


// 获取店员列表
async function salesclerkList(data) {
    const url = `/admin/clerk/list`
    const result = await get(url, data)
    return result
}

// 获取单个店员
async function singleSalesclerk(data) {
    const url = `/admin/clerk/find`
    const result = await get(url, data)
    return result
}

// 获取单个会员
async function singleMember(data) {
    const url = `/admin/member/find`
    const result = await get(url, data)
    return result
}

// 批量设置启用/禁用、删除也是这个请求
async function setStartOrForbidden(data) {
    const url = `/admin/clerk/batchedit`
    const result = await post(url, data)
    return result
}

// 编辑店员
async function editSalesclerk(data) {
    const url = `/admin/clerk/edit`
    const result = await post(url, data)
    return result
}

// 添加店员
async function addSalesclerk(data) {
    const url = `/admin/clerk/add`
    const result = await post(url, data)
    return result
}

export {
    salesclerkList,
    setStartOrForbidden,
    singleSalesclerk,
    editSalesclerk,
    addSalesclerk,
    singleMember
}
